package arbori;
import visitor.*;


public class Nod {
	protected Nod fStang;
	protected Nod fDrept;
	private double x;
	
	public Nod getFStang()
	{
		return this.fStang;
	}
	public Nod getFDrept()
	{
		return this.fDrept;
	}
	public void setFStang(Nod stang)
	{
		this.fStang=stang;
	}
	public void setFDrept(Nod drept)
	{
		this.fDrept=drept;
	}
	public void setX(double x)
	{
		this.x=x;
		if(fStang!=null)
			fStang.setX(x);
		if(fDrept!=null)
			fDrept.setX(x);
	}
	public double getX()
	{
		return this.x;
	}
	public void acceptVisitor(Visitor v)
	{
		v.visit(this);
	}
	
}

